/*
 * InsuranceContract。java
 * 
 * Created Date: 2014年12月2日
 * 
 * Copyright (c) Centling Technologies Co., Ltd.
 * 
 * This software is the confidential and proprietary information of
 * Centling Technologies Co., Ltd. ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only in accordance
 * with the terms of the license agreement you entered into with
 * Centling Technologies Co., Ltd.
 */

package com.centling.bluecollar.staff.entity;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

import com.centling.bluecollar.customer.entity.EnterpriseCustomer;
import com.centling.bluecollar.system.entity.ContractAccount;
import com.centling.bluecollar.system.entity.ContractBasicMaterials;
import com.centling.bluecollar.system.entity.EmploymentMaterials;
import com.centling.bluecollar.system.entity.InsuranceType;



/**
 * @author cary
 * @version <br>
 *          <p>
 *          人员合同信息
 *          </p>
 */
@Entity
@Table(name = "s_insuranceContract")
public class InsuranceContract {
	
	private String id;
	private String startTime;// 开始时间
	private String endTime;// 结束时间
	private String contractStatus;// 合同状态 （有效、无效）
	private String contractType;// 签订合同的类型（合同 或 协议）合同、协议
	private StaffInfo staffInfo;// 员工基本信息
	private String remarks;// 备注
	private String quitDate;// 员工离职日期        
	private String quitReason; //离职原因
	private String createTime;// 合同创建时间
	private String renew;//续签标志
	private String warning;//预警信息
	private EnterpriseCustomer enterpriseCustomer; // 派遣单位
	private ContractAccount contractAccount;// 合同户名
	private List<InsuranceType> insuranceType; // 保险类型，险种
	private List<ContractBasicMaterials> contractBasicMaterials; // 合同基本材料
	private List<EmploymentMaterials> employmentMaterials; // 就业相关材料
	
	/**
	 * @return the id
	 */
	@GenericGenerator(name = "idGenerator", strategy = "uuid")
	@Id
	@GeneratedValue(generator = "idGenerator")
	@Column(name = "id", unique = true, nullable = false, length = 40)
	public String getId() {
	
		return id;
	}
	
	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(String id) {
	
		this.id = id;
	}
	
	/**
	 * @return the startTime
	 */
	@Column(length = 40)
	public String getStartTime() {
	
		return startTime;
	}
	
	/**
	 * @param startTime
	 *            the startTime to set
	 */
	public void setStartTime(String startTime) {
	
		this.startTime = startTime;
	}
	
	/**
	 * @return the contractType
	 */
	
	@Column(length = 40)
	public String getContractType() {
	
		return contractType;
	}
	
	/**
	 * @param contractType
	 *            the contractType to set
	 */
	public void setContractType(String contractType) {
	
		this.contractType = contractType;
	}
	
	/**
	 * @return the endTime
	 */
	@Column(length = 40)
	public String getEndTime() {
	
		return endTime;
	}
	
	/**
	 * @param endTime
	 *            the endTime to set
	 */
	public void setEndTime(String endTime) {
	
		this.endTime = endTime;
	}
	
	/**
	 * @return the contractStatus
	 */
	@Column(length = 25)
	public String getContractStatus() {
	
		return contractStatus;
	}
	
	/**
	 * @param contractStatus
	 *            the contractStatus to set
	 */
	public void setContractStatus(String contractStatus) {
	
		this.contractStatus = contractStatus;
	}
	
	/**
	 * @return the remark
	 */
	@Column(length = 4000)
	public String getRemarks() {
	
		return remarks;
	}
	
	/**
	 * @param remark
	 *            the remark to set
	 */
	public void setRemarks(String remarks) {
	
		this.remarks = remarks;
	}
	
	
	
	/**
	 * @return the quitDate
	 */
	@Column(name = "quitDate", length = 40)
	public String getQuitDate() {
	
		return quitDate;
	}

	
	/**
	 * @param quitDate the quitDate to set
	 */
	public void setQuitDate(String quitDate) {
	
		this.quitDate = quitDate;
	}

	
	
	/**
	 * @return the quitReason
	 */
	@Column(name = "quitReason", length = 1000)
	public String getQuitReason() {
	
		return quitReason;
	}

	
	/**
	 * @param quitReason the quitReason to set
	 */
	public void setQuitReason(String quitReason) {
	
		this.quitReason = quitReason;
	}

	/**
	 * @return the createTime
	 */
	@Column(name = "createTime" ,length = 40)
	public String getCreateTime() {
	
		return createTime;
	}
	
	
	/**
	 * @return the renew
	 */
	@Column(name = "renew", length=20)
	public String getRenew() {
	
		return renew;
	}

	
	/**
	 * @param renew the renew to set
	 */
	public void setRenew(String renew) {
	
		this.renew = renew;
	}

	
	/**
	 * @return the warning
	 */
	@Transient
	public String getWarning() {
	
		return warning;
	}

	
	/**
	 * @param warning the warning to set
	 */
	public void setWarning(String warning) {
	
		this.warning = warning;
	}

	/**
	 * @param createTime
	 *            the createTime to set
	 */
	public void setCreateTime(String createTime) {
	
		this.createTime = createTime;
	}
	
	/**
	 * @return the enterpriseCustomer
	 */
	@ManyToOne(cascade = { CascadeType.ALL })
	@JoinColumn(name = "enterpriseCustomer_id")
	public EnterpriseCustomer getEnterpriseCustomer() {
	
		return enterpriseCustomer;
	}
	
	/**
	 * @param enterpriseCustomer
	 *            the enterpriseCustomer to set
	 */
	public void setEnterpriseCustomer(EnterpriseCustomer enterpriseCustomer) {
	
		this.enterpriseCustomer = enterpriseCustomer;
	}
	
	/**
	 * @return the staffInfo
	 */
	@ManyToOne
	@JoinColumn(name = "staffInfo_id")
	public StaffInfo getStaffInfo() {
	
		return staffInfo;
	}
	
	/**
	 * @param staffInfo
	 *            the staffInfo to set
	 */
	public void setStaffInfo(StaffInfo staffInfo) {
	
		this.staffInfo = staffInfo;
	}
	
	/**
	 * @return the insuranceType
	 */
	@Transient
	public List<InsuranceType> getInsuranceType() {
	
		return insuranceType;
	}
	
	/**
	 * @param insuranceType
	 *            the insuranceType to set
	 */
	public void setInsuranceType(List<InsuranceType> insuranceType) {
	
		this.insuranceType = insuranceType;
	}
	
	/**
	 * @return the contractAccount
	 */
	@ManyToOne
	@JoinColumn(name = "contractAccount_id")
	public ContractAccount getContractAccount() {
	
		return contractAccount;
	}
	
	/**
	 * @param contractAccount
	 *            the contractAccount to set
	 */
	public void setContractAccount(ContractAccount contractAccount) {
	
		this.contractAccount = contractAccount;
	}
	
	/**
	 * @return the contractBasicMaterials
	 */
	@Transient
	public List<ContractBasicMaterials> getContractBasicMaterials() {
	
		return contractBasicMaterials;
	}
	
	/**
	 * @param contractBasicMaterials
	 *            the contractBasicMaterials to set
	 */
	public void setContractBasicMaterials(
			List<ContractBasicMaterials> contractBasicMaterials) {
	
		this.contractBasicMaterials = contractBasicMaterials;
	}
	
	/**
	 * @return the employmentMaterials
	 */
	@Transient
	public List<EmploymentMaterials> getEmploymentMaterials() {
	
		return employmentMaterials;
	}
	
	/**
	 * @param employmentMaterials
	 *            the employmentMaterials to set
	 */
	public void setEmploymentMaterials(
			List<EmploymentMaterials> employmentMaterials) {
	
		this.employmentMaterials = employmentMaterials;
	}
	
}
